<template>
	<view class="">
		<view class="mt-5" v-if="u_loadmore">
			<u-loadmore status="loading" icon-type="circle" />
		</view>
		<view v-else>
			<view class="p-2 input_red">
				该规格为【手工录入】类型，手机端暂不支持修改，如需修改请至PC后台。
			</view>
			<view class="m-2">规格名称</view>
			<view class="m-2 p-3 rounded-20 bg-white">
				<view class="">{{attr_name}}</view>
				<view class="text-999 text-right mt-3">{{count}}/20</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return {
				attr_name:"", // 规格名称
				goods_id:0, // 商品ID
				specification_id:0, // 规格ID
				attr_id:0, // 属性ID
				spec_detail:"", // 规格详情
				count:0, // 计数
			}
		},
		methods:{
		},
		onShow() {
		},
		onLoad(e) {
			this.attr_id=e.attr_id
			this.goods_id=e.goods_id
			this.specification_id=e.specification_id
			console.log(e)
			this.$H.post("v2/store/goods/specification/attribute/detail",{
				attr_id:this.attr_id
			}).then(res=>{
				this.spec_detail=res.data
				this.attr_name=res.data.attr_name
				this.count=res.data.specification_name.length
				
				this.u_loadmore=false
				console.log(res)
			})
		},
	}
</script>

<style>
	.sub /deep/ .dele{
		background: linear-gradient(to right,#ebebeb,#ebebeb);
		border-radius: 50upx;
		width: 45%;
		color: #000000;
	}
	.sub /deep/ .dele::after{
		border: none;
		color: #000000;
	}
	.sub /deep/ .rele{
		width: 45%;
		border-radius: 50upx;
		background: linear-gradient(to right,#F31E3E,#FB4F37);
	}
	.param /deep/ button{
		width: 50%;
		border-radius: 50upx;
		background: linear-gradient(to right,#F31E3E,#FB4F37);
		color: #FFFFFF;
	}
	.s-popup-wrap{
		width: 80%;
		border-radius: 30upx;
	}
	.replenish{
		border: 4upx solid #999999;
		border-radius: 20upx;
	}
	.input_red{
		background-color: #f4e0e3;
		color: #FF0000;
	}
</style>
